package com.lishe.lishe.lishe.module.myorder.interfase;


import com.lishe.lishe.lishe.common.Globals;
import com.lishe.lishe.lishe.module.myorder.bean.LogisticsBean;
import com.lishe.lishe.lishe.module.myorder.bean.OrderDetatilBean;
import com.lishe.lishe.lishe.module.myorder.bean.OrderListBean;
import com.lishe.lishe.retrofit.BaseRequestBody;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by shino on 2017/12/26.
 */

public interface

OrederInterface {
    //我的订单信息接口数据
    @FormUrlEncoded
    @POST("user" + Globals.VERSIONNAME + "/getOrderList")
    Observable<OrderListBean> getOrderList(@Field("token") String token, @Field("status") String status, @Field("page") String page, @Field("pageSize") String pageSize);

    //取消订单
    @FormUrlEncoded
    @POST("Order/cancelOrder")
    Observable<BaseRequestBody<Object>> cancleOrder(@Field("token") String token, @Field("payment_id") String payment_id);

    //确认收货
    @FormUrlEncoded
    @POST("Order/confirmOrder")
    Observable<BaseRequestBody<Object>> confirmOrder(@Field("token") String token, @Field("payment_id") String payment_id);

    //获取物流信息
    @FormUrlEncoded
    @POST("Other/getExpressByTid")
    Observable<LogisticsBean> getExpressList(@Field("tid") String tid, @Field("token") String token);

    //获取订单详情
    @FormUrlEncoded
    @POST("user/orderInfo")
    Observable<OrderDetatilBean> getOrderDetail(@Field("token") String token,
                                                                 @Field("tid") String tid,
                                                                 @Field("paymentId") String paymentId);
}
